/*
 * @文件描述: 
 * @版本: 
 * @作者: 周晨阳
 * @Date: 2021-01-26 23:19:34
 */
#ifndef SIGGENERATOR_H
#define SIGGENERATOR_H

#include "public.h"

#define WAVE_TYPE_SIN 1
#define WAVE_TYPE_TRIANGLE 2
#define WAVE_TYPE_SQUARE 3
#define WAVE_TYPE_PWM 4

void SigGenerator_Init(u16 arr,u16 psc);
void setWaveType(uint8_t type);
void setPWM_Duty(uint8_t duty);
void setWaveFrequency(uint16_t frequency);
void setWaveAmp(float amp);
void setWaveOffset(float offset);
void triggerOn(void);
void triggerOff(void);

#endif